/*
 * Copyright (C) 2013 Daniel Treffenstädt <daniel@treffenstaedt.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301  USA
 */

#ifndef O_FACE_H
#define O_FACE_H

#include "../OGlobal.h"

#include <QList>

O_START_NAMESPACE

class O_EXPORT Face
{
public:
	enum class Position
	{
		Left	= 0,
		Right	= 1,
		Front	= 2,
		Back	= 3,
		Top		= 4,
		Bottom	= 5
	};

private:
	short					m_dimension;
	bool					m_visible;
	Position				m_position;
	short**					m_height;
	bool**					m_traversion;
	short					m_base;
	short					m_top;

public:
	Face();
	Face(short dimension, Position p, bool visible = false);
	Face(short dimension, short** height, bool** traversion, Position p, short base, short top, bool visible = false);

	virtual ~Face();

	bool visible();

	void setVisible(bool state);

	Position position();

	void setPosition(Position p);

	short heightAt(int x, int y);

	void setHeight(int x, int y, short value);

	void setTraversion(int x, int y, bool t);

	bool getTraversion(int x, int y);

	void setBase(short base);

	void setTop(short top);

	short base();

	short top();
};

O_END_NAMESPACE

#endif // O_FACE_H
